home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Statuswi.pxl < prev    next >
Text File  |  2000-12-23  |  3KB  |  113 lines

  1. Initialize:
  2.     WinGetActive(Win$)
  3.     UseCoordinates(PIXEL)
  4.     {GoSub Draw_Blue_Shade}
  5.     UseBackGround(TRANSPARENT,192,192,192)
  6.     DrawBackGround
  7.     WaitInput(100)  {let NT and 95 catch up}
  8.     InfoMenu(REMOVE)
  9.     SetMenu()
  10.     WinLocate(Win$,200,10,640,220,Res)
  11.     Title$ = "Status Window Example"
  12.     WinTitle(Win$, Title$)
  13.  
  14.  
  15.  
  16.     SetMenu("Exit!",Leave,
  17.         ENDPOPUP,
  18.         "Status Window",IGNORE,
  19.         "Enable StatusTOP",EnableTOP,
  20.         "Enable StatusBTM",EnableBTM,
  21.         "Enable Status Parts",EnableParts,
  22.         "Disable Status",Disable,
  23.         "Write Parts",WriteParts,
  24.         "Test",DoAll,
  25.         SEPARATOR,
  26.         "Background",Bkg,
  27.         ENDPOPUP,
  28.         "Str Replace",Replace,
  29.         ENDPOPUP)
  30.     
  31. Wait_for_Input:
  32.     WaitInput()
  33.  
  34.  
  35. Leave:
  36.     End
  37.  
  38. Replace:
  39.     DrawBackGround
  40.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  41.     String0$ = "g:\images\abcfbnd1.bmp"
  42.     String1$ = "bmp"
  43.     String2$ = "jpg"
  44.     DrawText(10,10,String0$)
  45.     StrRepl(String0$,String1$,String2$,Res)
  46.     If Res= 1 Then DrawText(10,35,String0$)
  47.     Goto Wait_for_Input
  48.  
  49.  
  50. DoAll:
  51.     GoSub Sub_1
  52.     Goto Wait_for_Input
  53.  
  54. EnableTOP:
  55.     StatusWindow(ENABLE,TOP,1,200,0,0,0)
  56.     Goto Wait_for_Input
  57.  
  58. EnableBTM:
  59.     StatusWindow(ENABLE,BOTTOM,0,100,200,0,0)
  60.     Goto Wait_for_Input
  61.  
  62. EnableParts:
  63.     StatusWindow(ENABLE,BOTTOM,4,160,210,270,-1)
  64.     Goto Wait_for_Input
  65.  
  66. WriteParts:
  67.     GoSub Sub_1
  68.     Goto Wait_for_Input
  69.  
  70.  
  71. Disable:
  72.     StatusWindow(DISABLE,BOTTOM,0,0,0,0,0)
  73.     Goto Wait_for_Input
  74.  
  75.  
  76. Bkg:
  77.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  78.     InvertRectangle(cx1,cy1,cx2,cy2)
  79.     Goto Wait_for_Input
  80.  
  81. Sub_1:
  82.     StatusWindow(ENABLE,BOTTOM,4,160,210,270,-1)
  83. Sub_2:
  84.     DrawBackGround
  85.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  86.     cx2 = cx2 - 30     cy2 = cy2 - 15
  87.     UseFont("Arial",7,17,BOLD,NOITALIC,NOUNDERLINE,255,255,255)
  88.     DrawTextExt(31,16,cx2,cy2,
  89. "Example of a multi-part status bar, showing various
  90. sized parts and text, in the default position at the
  91. bottom of the application client area. When the 
  92. window is resized, the status bar is automatically
  93. redrawn with the existing text.", LEFT)
  94.  
  95.     cx2--      cy2--
  96.     UseFont("Arial",7,17,BOLD,NOITALIC,NOUNDERLINE,0,0,0)
  97.     DrawTextExt(30,15,cx2,cy2,
  98. "Example of a multi-part status bar, showing various
  99. sized parts and text, in the default position at the
  100. bottom of the application client area. When the 
  101. window is resized, the status bar is automatically
  102. redrawn with the existing text.", LEFT)
  103.  
  104.     DrawStatusWinText(0,"Part#0")
  105.     DrawStatusWinText(1,"Part#1")
  106.     DrawStatusWinText(2,"Part#2")
  107.     DrawStatusWinText(3,"Part#3")
  108.  
  109.     Return
  110.  
  111.  
  112.  
  113.